// Verilated -*- C++ -*-
// DESCRIPTION: Verilator output: Tracing implementation internals
#include "verilated_vcd_c.h"
#include "Vtop__Syms.h"


void Vtop___024root__trace_chg_sub_0(Vtop___024root* vlSelf, VerilatedVcd::Buffer* bufp);

void Vtop___024root__trace_chg_top_0(void* voidSelf, VerilatedVcd::Buffer* bufp) {
    VL_DEBUG_IF(VL_DBG_MSGF("+    Vtop___024root__trace_chg_top_0\n"); );
    // Init
    Vtop___024root* const __restrict vlSelf VL_ATTR_UNUSED = static_cast<Vtop___024root*>(voidSelf);
    Vtop__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp;
    if (VL_UNLIKELY(!vlSymsp->__Vm_activity)) return;
    // Body
    Vtop___024root__trace_chg_sub_0((&vlSymsp->TOP), bufp);
}

void Vtop___024root__trace_chg_sub_0(Vtop___024root* vlSelf, VerilatedVcd::Buffer* bufp) {
    if (false && vlSelf) {}  // Prevent unused
    Vtop__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp;
    VL_DEBUG_IF(VL_DBG_MSGF("+    Vtop___024root__trace_chg_sub_0\n"); );
    // Init
    uint32_t* const oldp VL_ATTR_UNUSED = bufp->oldp(vlSymsp->__Vm_baseCode + 1);
    // Body
    if (VL_UNLIKELY(vlSelf->__Vm_traceActivity[1U])) {
        bufp->chgIData(oldp+0,(vlSelf->top__DOT__u_register_file__DOT__reg_file[0]),32);
        bufp->chgIData(oldp+1,(vlSelf->top__DOT__u_register_file__DOT__reg_file[1]),32);
        bufp->chgIData(oldp+2,(vlSelf->top__DOT__u_register_file__DOT__reg_file[2]),32);
        bufp->chgIData(oldp+3,(vlSelf->top__DOT__u_register_file__DOT__reg_file[3]),32);
        bufp->chgIData(oldp+4,(vlSelf->top__DOT__u_register_file__DOT__reg_file[4]),32);
        bufp->chgIData(oldp+5,(vlSelf->top__DOT__u_register_file__DOT__reg_file[5]),32);
        bufp->chgIData(oldp+6,(vlSelf->top__DOT__u_register_file__DOT__reg_file[6]),32);
        bufp->chgIData(oldp+7,(vlSelf->top__DOT__u_register_file__DOT__reg_file[7]),32);
        bufp->chgIData(oldp+8,(vlSelf->top__DOT__u_register_file__DOT__reg_file[8]),32);
        bufp->chgIData(oldp+9,(vlSelf->top__DOT__u_register_file__DOT__reg_file[9]),32);
        bufp->chgIData(oldp+10,(vlSelf->top__DOT__u_register_file__DOT__reg_file[10]),32);
        bufp->chgIData(oldp+11,(vlSelf->top__DOT__u_register_file__DOT__reg_file[11]),32);
        bufp->chgIData(oldp+12,(vlSelf->top__DOT__u_register_file__DOT__reg_file[12]),32);
        bufp->chgIData(oldp+13,(vlSelf->top__DOT__u_register_file__DOT__reg_file[13]),32);
        bufp->chgIData(oldp+14,(vlSelf->top__DOT__u_register_file__DOT__reg_file[14]),32);
        bufp->chgIData(oldp+15,(vlSelf->top__DOT__u_register_file__DOT__reg_file[15]),32);
        bufp->chgIData(oldp+16,(vlSelf->top__DOT__u_register_file__DOT__reg_file[16]),32);
        bufp->chgIData(oldp+17,(vlSelf->top__DOT__u_register_file__DOT__reg_file[17]),32);
        bufp->chgIData(oldp+18,(vlSelf->top__DOT__u_register_file__DOT__reg_file[18]),32);
        bufp->chgIData(oldp+19,(vlSelf->top__DOT__u_register_file__DOT__reg_file[19]),32);
        bufp->chgIData(oldp+20,(vlSelf->top__DOT__u_register_file__DOT__reg_file[20]),32);
        bufp->chgIData(oldp+21,(vlSelf->top__DOT__u_register_file__DOT__reg_file[21]),32);
        bufp->chgIData(oldp+22,(vlSelf->top__DOT__u_register_file__DOT__reg_file[22]),32);
        bufp->chgIData(oldp+23,(vlSelf->top__DOT__u_register_file__DOT__reg_file[23]),32);
        bufp->chgIData(oldp+24,(vlSelf->top__DOT__u_register_file__DOT__reg_file[24]),32);
        bufp->chgIData(oldp+25,(vlSelf->top__DOT__u_register_file__DOT__reg_file[25]),32);
        bufp->chgIData(oldp+26,(vlSelf->top__DOT__u_register_file__DOT__reg_file[26]),32);
        bufp->chgIData(oldp+27,(vlSelf->top__DOT__u_register_file__DOT__reg_file[27]),32);
        bufp->chgIData(oldp+28,(vlSelf->top__DOT__u_register_file__DOT__reg_file[28]),32);
        bufp->chgIData(oldp+29,(vlSelf->top__DOT__u_register_file__DOT__reg_file[29]),32);
        bufp->chgIData(oldp+30,(vlSelf->top__DOT__u_register_file__DOT__reg_file[30]),32);
        bufp->chgIData(oldp+31,(vlSelf->top__DOT__u_register_file__DOT__reg_file[31]),32);
    }
    if (VL_UNLIKELY(vlSelf->__Vm_traceActivity[2U])) {
        bufp->chgIData(oldp+32,(((IData)(4U) + vlSelf->top__DOT__pc)),32);
        bufp->chgIData(oldp+33,(vlSelf->top__DOT__instr),32);
        bufp->chgBit(oldp+34,(vlSelf->top__DOT__reg_write));
        bufp->chgCData(oldp+35,(vlSelf->top__DOT__imm_src),3);
        bufp->chgCData(oldp+36,(vlSelf->top__DOT__alu_srcA),2);
        bufp->chgCData(oldp+37,(vlSelf->top__DOT__alu_srcB),2);
        bufp->chgBit(oldp+38,(vlSelf->top__DOT__mem_write));
        bufp->chgCData(oldp+39,(vlSelf->top__DOT__mem_write_mask),4);
        bufp->chgBit(oldp+40,(vlSelf->top__DOT__mem_en));
        bufp->chgCData(oldp+41,(vlSelf->top__DOT__result_src),2);
        bufp->chgCData(oldp+42,(vlSelf->top__DOT__alu_control),3);
        bufp->chgIData(oldp+43,(vlSelf->top__DOT__imm_ext),32);
        bufp->chgIData(oldp+44,(vlSelf->top__DOT__pc),32);
        bufp->chgCData(oldp+45,((0x7fU & vlSelf->top__DOT__instr)),7);
        bufp->chgCData(oldp+46,((7U & (vlSelf->top__DOT__instr 
                                       >> 0xcU))),3);
        bufp->chgBit(oldp+47,((1U & (vlSelf->top__DOT__instr 
                                     >> 0x1eU))));
        bufp->chgBit(oldp+48,(vlSelf->top__DOT__u_control_unit__DOT__branch));
        bufp->chgBit(oldp+49,(vlSelf->top__DOT__u_control_unit__DOT__jump));
        bufp->chgCData(oldp+50,(vlSelf->top__DOT__u_control_unit__DOT__alu_op),2);
        bufp->chgBit(oldp+51,((1U & (vlSelf->top__DOT__instr 
                                     >> 5U))));
        bufp->chgCData(oldp+52,((0x1fU & (vlSelf->top__DOT__instr 
                                          >> 0xfU))),5);
        bufp->chgCData(oldp+53,((0x1fU & (vlSelf->top__DOT__instr 
                                          >> 0x14U))),5);
        bufp->chgCData(oldp+54,((0x1fU & (vlSelf->top__DOT__instr 
                                          >> 7U))),5);
    }
    if (VL_UNLIKELY((vlSelf->__Vm_traceActivity[2U] 
                     | vlSelf->__Vm_traceActivity[3U]))) {
        bufp->chgIData(oldp+55,(((((IData)(vlSelf->top__DOT__u_control_unit__DOT__branch) 
                                   & (0U == vlSelf->top__DOT__alu_result)) 
                                  | (IData)(vlSelf->top__DOT__u_control_unit__DOT__jump))
                                  ? vlSelf->top__DOT__alu_result
                                  : ((IData)(4U) + vlSelf->top__DOT__pc))),32);
        bufp->chgBit(oldp+56,((((IData)(vlSelf->top__DOT__u_control_unit__DOT__branch) 
                                & (0U == vlSelf->top__DOT__alu_result)) 
                               | (IData)(vlSelf->top__DOT__u_control_unit__DOT__jump))));
        bufp->chgIData(oldp+57,(((0U == (IData)(vlSelf->top__DOT__result_src))
                                  ? vlSelf->top__DOT__alu_result
                                  : ((1U == (IData)(vlSelf->top__DOT__result_src))
                                      ? vlSelf->top__DOT__read_data
                                      : ((2U == (IData)(vlSelf->top__DOT__result_src))
                                          ? ((IData)(4U) 
                                             + vlSelf->top__DOT__pc)
                                          : ((3U == (IData)(vlSelf->top__DOT__result_src))
                                              ? vlSelf->top__DOT__imm_ext
                                              : 0U))))),32);
        bufp->chgIData(oldp+58,(((1U & (IData)(vlSelf->top__DOT__alu_control))
                                  ? (~ vlSelf->top__DOT__srcB)
                                  : vlSelf->top__DOT__srcB)),32);
        bufp->chgBit(oldp+59,((1U & ((~ ((IData)(vlSelf->top__DOT__alu_control) 
                                         >> 1U)) & 
                                     ((~ ((IData)(vlSelf->top__DOT__alu_control) 
                                          ^ ((vlSelf->top__DOT__srcA 
                                              ^ vlSelf->top__DOT__srcB) 
                                             >> 0x1fU))) 
                                      & ((vlSelf->top__DOT__u_alu__DOT__sum 
                                          ^ vlSelf->top__DOT__srcA) 
                                         >> 0x1fU))))));
    }
    if (VL_UNLIKELY(vlSelf->__Vm_traceActivity[3U])) {
        bufp->chgIData(oldp+60,(vlSelf->top__DOT__alu_result),32);
        bufp->chgBit(oldp+61,((0U == vlSelf->top__DOT__alu_result)));
        bufp->chgIData(oldp+62,(vlSelf->top__DOT__RD2),32);
        bufp->chgIData(oldp+63,(vlSelf->top__DOT__srcA),32);
        bufp->chgIData(oldp+64,(vlSelf->top__DOT__srcB),32);
        bufp->chgIData(oldp+65,(vlSelf->top__DOT__read_data),32);
        bufp->chgIData(oldp+66,(vlSelf->top__DOT__u_alu__DOT__sum),32);
    }
    bufp->chgBit(oldp+67,(vlSelf->clk));
    bufp->chgBit(oldp+68,(vlSelf->rst_n));
    bufp->chgIData(oldp+69,(((0U == (0x1fU & (vlSelf->top__DOT__instr 
                                              >> 0xfU)))
                              ? 0U : vlSelf->top__DOT__u_register_file__DOT__reg_file
                             [(0x1fU & (vlSelf->top__DOT__instr 
                                        >> 0xfU))])),32);
}

void Vtop___024root__trace_cleanup(void* voidSelf, VerilatedVcd* /*unused*/) {
    VL_DEBUG_IF(VL_DBG_MSGF("+    Vtop___024root__trace_cleanup\n"); );
    // Init
    Vtop___024root* const __restrict vlSelf VL_ATTR_UNUSED = static_cast<Vtop___024root*>(voidSelf);
    Vtop__Syms* const __restrict vlSymsp VL_ATTR_UNUSED = vlSelf->vlSymsp;
    // Body
    vlSymsp->__Vm_activity = false;
    vlSymsp->TOP.__Vm_traceActivity[0U] = 0U;
    vlSymsp->TOP.__Vm_traceActivity[1U] = 0U;
    vlSymsp->TOP.__Vm_traceActivity[2U] = 0U;
    vlSymsp->TOP.__Vm_traceActivity[3U] = 0U;
}
